﻿using D.Medicalcare.ErrorCode;
using D.Medicalcare.Write.API.Application.Commands.AccountbalanceCommand;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace D.Medicalcare.Write.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class AccountbalanceController : ControllerBase
    {
        private readonly IMediator mediator;

        public AccountbalanceController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 订单添加
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost]
        public Task<APIResult<object>> CreateAccountbalance(CreateAccountbalanceCommand request)
        {
            return mediator.Send(request);
        }
    }
}
